<div class="fandoms-index">
  <!--Descriptive page name, messages and instructions-->
  <h2>
    <% if @medium %>
      <%= @medium.name %>
    <% else %>
      All Fandoms
    <% end %>
  </h2>
  <!--/descriptions-->

  <!--main content-->
  <% if @fandoms_by_letter && !@fandoms_by_letter.empty? %>
    <ul class="alphabet">
      <% for letter in @fandoms_by_letter.keys %>
        <li><%= link_to letter, "#letter-#{letter}" %></li>
      <% end %>
    </ul>
    <ul class="letters shadowed <%= 'collection' if @collection %>">
      <% @fandoms_by_letter.each_pair do |letter, fandoms| %>
        <li id='letter-<%= letter %>' class='letter'>
          <h3 class="shadowed">
            <%= letter %>
            <span class="top"><%= link_to "top", "#main" %></span>
          </h3>
          <ul class="fandom index">
            <% for fandom in fandoms %>
            <li class='<%= cycle('odd', 'even', :name => "letter-#{letter}") %>'>
              <%= link_to(fandom.name, static_collection_fandom_path(@collection, fandom)) %>
              <% if fandom.respond_to?(:count) %>
                (<%= fandom.count %>)
              <% end %>
            </li>
            <% end %>
          </ul>
        </li>
      <% end %>
    </ul>
  <% else %>
    <h3 class="no_fandoms"><%= ts("No fandoms found") %></h3>
  <% end %>
  <!--/content-->
</div>
